<?php
/**
 * CreateTime: 2024/1/12 16:23
 * User:LinQ
 */

namespace App\ApiCall\Gaode;


class GaodeWebApiExecute
{
    private $client;

    public function __construct()
    {
        $this->client = GaodeWebApiClient::getInstance('',config('openapi.gd_web_restapi_key'),'https://restapi.amap.com/');
    }

    public function ipToAddress($ip){
        $res = $this->client->execute('v3/ip?',[
            'ip' => $ip
        ]);
        return json_decode($res->body(),true);
    }
}